<template>
  <div class="main">
    <photo-upload class="photo-upload" :token="token"></photo-upload>
  </div>
</template>
<script>
  import axios from 'axios'
  import PhotoUpload from '@/components/PhotoUpload/PhotoUpload'
  export default {
    name: 'index',
    components: {
      PhotoUpload
    },
    data () {
      return {
        token: ''
      }
    },
    mounted () {
      axios.post('https://m2.yaolaivip.com/api/user/login', 'accountId=15800000000&password=12345678', {
        headers: {
          'Content-Type': 'application/x-www-form-urlencoded'
        }
      }).then(resp => {
        this.token = resp.data.data.token
      })
    }
  }
</script>
<style lang="less" scoped>
</style>